import request from '@/utils/request'

// 查询私教课程列表
export function listPersonal(query) {
  return request({
    url: '/course/personal/list',
    method: 'post',
    data: {
      courseName: query.courseName,
      pageIndex: query.pageNum,
      pageSize: query.pageSize,
      trainerId: query.trainerId
    }
  })
}

// 查询私教课程详细
export function getPersonal(id) {
  return request({
    url: '/gym/personal/' + id,
    method: 'get'
  })
}

// 新增私教课程
export function addPersonal(data) {
  return request({
    url: '/gym/personal',
    method: 'post',
    data: data
  })
}

// 修改私教课程
export function updatePersonal(data) {
  return request({
    url: '/gym/personal',
    method: 'put',
    data: data
  })
}

// 删除私教课程
export function delPersonal(id) {
  return request({
    url: '/gym/personal/' + id,
    method: 'delete'
  })
}